﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Goldlight.Mvvm.Base;

namespace Goldlight.SampleApplication.ViewModels
{
    public class AccountInformationViewModel : MainWindowViewModelBase
    {
        #region Members
        private long _accountID;
        private long? _parentAccount;
        private string _accountName;
        private string _accountNumber;
        private string _addressID;
        private string _addressName;
        private string _street1;
        private string _street2;
        private string _street3;
        private string _city;
        private string _county;
        private string _postCode;
        private long _country;
        private LanguageResources.Language _language;
        #endregion

        /// <summary>
        /// Initialize a new instance of <see cref="AccountInformationViewModel"/>.
        /// </summary>
        public AccountInformationViewModel() : base()
        {
            _language = new LanguageResources.Language();
        }
        #region Properties
        /// <summary>
        /// Get the resources from the system.
        /// </summary>
        public override object Resources
        {
            get
            {
                return _language;
            }
        }
        /// <summary>
        /// Get or set the account primary key.
        /// </summary>
        public long AccountID
        {
            get
            {
                return _accountID;
            }
            set
            {
                if (_accountID != value)
                {
                    _accountID = value;
                    OnChanged("AccountID");
                }
            }
        }
        /// <summary>
        /// Get or set the account name.
        /// </summary>
        public string AccountName
        {
            get
            {
                return _accountName;
            }
            set
            {
                if (_accountName != value)
                {
                    _accountName = value;
                    OnChanged("AccountName");
                }
            }
        }
        /// <summary>
        /// Get or set the account number.
        /// </summary>
        public string AccountNumber
        {
            get
            {
                return _accountNumber;
            }
            set
            {
                if (_accountNumber != value)
                {
                    _accountNumber = value;
                    OnChanged("AccountNumber");
                }
            }
        }
        /// <summary>
        /// Get or set the foreign key to the parent account.
        /// </summary>
        public long? ParentAccount
        {
            get
            {
                return _parentAccount;
            }
            set
            {
                if (_parentAccount != value)
                {
                    _parentAccount = value;
                    OnChanged("ParentAccount");
                }
            }
        }
        /// <summary>
        /// Get or set the address primary key.
        /// </summary>
        public string AddressID
        {
            get
            {
                return _addressID;
            }
            set
            {
                if (_addressID != value)
                {
                    _addressID = value;
                    OnChanged("AddressID");
                }
            }
        }
        /// <summary>
        /// Get or set the address name.
        /// </summary>
        public string AddressName
        {
            get
            {
                return _addressName;
            }
            set
            {
                if (_addressName != value)
                {
                    _addressName = value;
                    OnChanged("AddressName");
                }
            }
        }
        /// <summary>
        /// Get or set the first street line.
        /// </summary>
        public string Street1
        {
            get
            {
                return _street1;
            }
            set
            {
                if (_street1 != value)
                {
                    _street1 = value;
                    OnChanged("Street1");
                }
            }
        }
        /// <summary>
        /// Get or set the second street line.
        /// </summary>
        public string Street2
        {
            get
            {
                return _street2;
            }
            set
            {
                if (_street2 != value)
                {
                    _street2 = value;
                    OnChanged("Street2");
                }
            }
        }
        /// <summary>
        /// Get or set the third street line.
        /// </summary>
        public string Street3
        {
            get
            {
                return _street3;
            }
            set
            {
                if (_street3 != value)
                {
                    _street3 = value;
                    OnChanged("Street3");
                }
            }
        }
        /// <summary>
        /// Get or set the city.
        /// </summary>
        public string City
        {
            get
            {
                return _city;
            }
            set
            {
                if (_city != value)
                {
                    _city = value;
                    OnChanged("City");
                }
            }
        }
        /// <summary>
        /// Get or set the county.
        /// </summary>
        public string County
        {
            get
            {
                return _county;
            }
            set
            {
                if (_county != value)
                {
                    _county = value;
                    OnChanged("County");
                }
            }
        }
        /// <summary>
        /// Get or set the post code.
        /// </summary>
        public string PostCode
        {
            get
            {
                return _postCode;
            }
            set
            {
                if (_postCode != value)
                {
                    _postCode = value;
                    OnChanged("PostCode");
                }
            }
        }
        /// <summary>
        /// Get or set the foreign key to the country.
        /// </summary>
        public long Country
        {
            get
            {
                return _country;
            }
            set
            {
                if (_country != value)
                {
                    _country = value;
                    OnChanged("Country");
                }
            }
        }
        #endregion
    }
}
